﻿@model IEnumerable<InfoLogic.Models.Business>
@{
    ViewBag.Title = "FindUserBusinesses";
}

<h2>Businesses</h2>

<table data-role="table" data-mode="columntoggle" id="my-table" data-filter="true">
    <tr>
        <th>
          @*  @Html.DisplayNameFor(model => model.BusinessName)*@
            Name
        </th>
        <th>
           @* @Html.DisplayNameFor(model => model.BusinessType.BusinessTypeName)*@
            Type
        </th>
        <th>
           @* @Html.DisplayNameFor(model => model.StartingDate)*@
            Starting Date
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.BusinessName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BusinessType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.StartingDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.BusinessId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.BusinessId }) |
            @Html.ActionLink("Manage", "Manage","Business") 
        </td>
    </tr>
}

  </table>